package top.honlnk.czuan.pojo.dto.add;

import cn.hutool.json.JSONUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AddWordDTO {
    private String word;
    private String baseTranslation; // 基础翻译
    private String sense; // 单词的含义
    private String explain; // 单词的详细解释，可以辅助单词记忆
    private String usSymbol;
    private String enSymbol;
    private Integer superordinateId;
    private List<Integer> rootIdList;
    private List<Integer> prefixIdList;
    private List<Integer> suffixIdList;
    private List<Integer> translationIdList;
    private String dictDataJsonUrl;
    private String aiExplainMdUrl;
    private String enAudioUrl;
    private String zhAudioUrl;

    public String getRootIdListJson() {
        return JSONUtil.toJsonStr(rootIdList);
    }

    public String getPrefixIdListJson() {
        return JSONUtil.toJsonStr(prefixIdList);
    }

    public String getSuffixIdListJson() {
        return JSONUtil.toJsonStr(suffixIdList);
    }

    public String getTranslationIdListJson() {
        return JSONUtil.toJsonStr(translationIdList);
    }
}
